/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-03-12
 * Time: 14:41
 */
public class sql {
    /**
     * LeetCode 1581  进店却未进行过交易的顾客
     */

    // select customer_id,count(customer_id) as count_no_trans from Visits v left join transactions t on v.visit_id = t.visit_id
    // where transaction_id is null group by customer_id;


    /**
     * LeetCode 197   上升的温度
     */
    // select w2.id from Weather w1,Weather w2 where datediff(w2.recordDate,w1.recordDate) = 1 and w2.Temperature > w1.Temperature

    /**
     * LeetCode 1661 每台机器的进程平均运行时间
     */
    // select a1.machine_id,round(avg(a2.timestamp - a1.timestamp),3) as processing_time from Activity as a1 inner join
    // Activity as a2 on a1.machine_id = a2.machine_id and a1.process_id = a2.process_id and a1.activity_type = 'start'
    // and a2.activity_type = 'end' group by a1.machine_id;

    /**
     * LeetCode  577 员工奖金
     */

    // select e.name,b.bonus from Employee as e left join Bonus as b on e.empId = b.empId where
    // b.bonus<1000 or b.bonus is null;
}
